/*============注册手机号===================*/
document.querySelector(".register-right-main .username").onclick = function (){
    var username=document.querySelector(".register-right-main .username").values;
    if(username == ""||username ==null){
        document.querySelector(".register-right-main .username-msg").innerText="手机号不能为空";

    }else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(username)){
        document.querySelector(".register-right-main .username-msg").innerText="请输入正确的手机号";
    }else{
        document.querySelector(".register-right-main .username-msg").innerText="";
    }
}
/*===============密码=================*/
document.querySelector(".register-password").onclick = function (){
    var password1=document.querySelector(".register-password").values;
    if (password1== ""||password1 ==null){
        document.querySelector(".register-password-msg").innerText="密码不能为空";

    }else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(password1)){
        document.querySelector(".register-password-msg").innerText="请输入正确的验证码";
    }else{
        document.querySelector(".register-password-msg").innerText="";
    }
}
/*=================再次确认密码v==========================*/
document.querySelector(".register-password2").onclick = function (){
    var password2=document.querySelector(".register-password2").values;
    if (password2== ""||password2 ==null){
        document.querySelector(".register-password-msg2").innerText="请再次输入密码";

    }else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(password2)){
        document.querySelector(".register-password-msg2").innerText="密码于之前不一致";
    }else{
        document.querySelector(".register-password-msg2").innerText="";
    }
}
